package com.sg.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sg.framework.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.util.Date;

/**
 * @author xxx
 */
@Data
@Accessors(chain = true)
@TableName("oms_bill")  //7-1-02账单表
public class OmsBill extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 对方logo
     */
    @TableField(value = "opposite_logo")
    @Schema(description = "对方logo")
    private String oppositeLogo;

    /**
     * 对方名称
     */
    @TableField(value = "opposite_name")
    @Schema(description = "对方名称")
    private String oppositeName;

    /**
     * 对方支付渠道账户（账户编码）
     */
    @TableField(value = "opposite_account_code")
    @Schema(description = "对方支付渠道账户（账户编码）")
    private String oppositeAccountCode;

    /**
     * 对方支付渠道账户名称
     */
    @TableField(value = "opposite_account_name")
    @Schema(description = "对方支付渠道账户名称")
    private String oppositeAccountName;

    /**
     * 对方银行开户行名称
     */
    @TableField(value = "opposite_opening_bank_name")
    @Schema(description = "对方银行开户行名称")
    private String oppositeOpeningBankName;

    /**
     * 收支方式 ONLINE_PAYMENT:在线支付 PAY_DELIVERY:货到付款 CASH:现金 ON_CREDIT:赊账 TALLY:记账
     */
    @TableField(value = "bill_method")
    @NotNull(message = "收支方式不能为空")
    @Schema(description = "收支方式")
    private String billMethod;

    /**
     * 支付渠道 ALIPAY:支付宝 WE_CHAT_PAY:微信支付 BANK_CARD:银行卡
     */
    @TableField(value = "pay_channel")
    @Schema(description = "支付渠道")
    private String payChannel;

    /**
     * 支付渠道支付单号
     */
    @TableField(value = "pay_channel_order_no")
    @Schema(description = "支付渠道支付单号")
    private String payChannelOrderNo;

    /**
     * 关联业务单据对象ID
     */
    @TableField(value = "biz_bill_object_id")
    @Schema(description = "关联业务单据对象ID")
    private String bizBillObjectId;

    /**
     * 关联业务单据对象类型 TRADING_ORDER:交易订单 WITHDRAWAL_DOCUMENT:提现单 PROJECT:项目
     */
    @TableField(value = "biz_bill_object_type_code")
    @Schema(description = "关联业务单据对象类型")
    private String bizBillObjectTypeCode;

    /**
     * 账单状态 UNDERWAY:进行中 COMPLETE:完成 CLOSE:关闭
     */
    @TableField(value = "bill_status")
    @NotNull(message = "账单状态不能为空")
    @Schema(description = "账单状态")
    private String billStatus;

    /**
     * 生态账户类型编码 POOL_ACCOUNT:发行账户 ECOLOGICAL_ACCOUNT:生态账户
     */
    @TableField(value = "ecological_account_type_code")
    @NotNull(message = "生态账户类型编码不能为空")
    @Schema(description = "生态账户类型编码")
    private String ecologicalAccountTypeCode;

    /**
     * 冗余发行体系类型编码 CAPITAL_SYSTEM:资金体系 INTEGRAL_SYSTEM:积分体系
     */
    @TableField(value = "distribution_system_type_code")
    @NotNull(message = "冗余发行体系类型编码不能为空")
    @Schema(description = "冗余发行体系类型编码")
    private String distributionSystemTypeCode;

    /**
     * 是否组织正式财务标准 TRUE:是 FALSE:否
     */
    @TableField(value = "is_org_official_account_nom")
    @NotNull(message = "是否组织正式财务标准不能为空")
    @Schema(description = "是否组织正式财务标准")
    private String isOrgOfficialAccountNom;

    /**
     * 关联发行账户ID
     */
    @TableField(value = "distribution_account_id")
    @Schema(description = "关联发行账户ID")
    private String distributionAccountId;

    /**
     * 记录结算引擎ID
     */
    @TableField(value = "expenses_settle_engine_id")
    @Schema(description = "记录结算引擎ID")
    private String expensesSettleEngineId;

    /**
     * 账单流水号ID
     */
    @TableId(value = "bill_flow_id", type = IdType.ASSIGN_UUID)
    @NotNull(message = "billFlowId不能为空")
    private String billFlowId;

    /**
     * 账单金额
     */
    @TableField(value = "bill_amount")
    @NotNull(message = "账单金额不能为空")
    @Schema(description = "账单金额")
    private Double billAmount;

    /**
     * 收支类型 INCOME:收入 SPENDING:支出
     */
    @TableField(value = "bill_type_code")
    @NotNull(message = "收支类型不能为空")
    @Schema(description = "收支类型")
    private String billTypeCode;

    /**
     * 是否发生方账单 TRUE:是 FALSE:否
     */
    @TableField(value = "is_origin_bill")
    @NotNull(message = "是否发生方账单不能为空")
    @Schema(description = "是否发生方账单")
    private String isOriginBill;

    /**
     * 是否对接财务 TRUE:是 FALSE:否
     */
    @TableField(value = "is_butt_dataassets")
    @NotNull(message = "是否对接财务不能为空")
    @Schema(description = "是否对接财务")
    private String isButtdataassets;

    /**
     * 流水业务故事信息
     */
    @TableField(value = "bill_biz_story")
    @NotNull(message = "流水业务故事信息不能为空")
    @Schema(description = "流水业务故事信息")
    private String billBizStory;

    /**
     * 账单归属账户ID
     */
    @TableField(value = "bill_account_id")
    @NotNull(message = "账单归属账户ID不能为空")
    @Schema(description = "账单归属账户ID")
    private String billAccountId;

    /**
     * 账单归属账户余额
     */
    @TableField(value = "bill_account_balance")
    @NotNull(message = "账单归属账户余额不能为空")
    @Schema(description = "账单归属账户余额")
    private Double billAccountBalance;

    /**
     * 账单归属账户主体ID
     */
    @TableField(value = "bill_object_id")
    @NotNull(message = "账单归属账户主体ID不能为空")
    @Schema(description = "账单归属账户主体ID")
    private String billObjectId;

    /**
     * 账单归属账户主体类型编码 TARGET:目标 TARGET_CATEGORY:目标分类 OBJECTIVE:指标 DEPT:部门
     */
    @TableField(value = "bill_object_type_code")
    @NotNull(message = "账单归属账户主体类型编码不能为空")
    @Schema(description = "账单归属账户主体类型编码")
    private String billObjectTypeCode;

    /**
     * 对方账户ID
     */
    @TableField(value = "opposite_account_id")
    @Schema(description = "对方账户ID")
    private String oppositeAccountId;

    /**
     * 对方账户余额
     */
    @TableField(value = "opposite_account_balance")
    @Schema(description = "对方账户余额")
    private Double oppositeAccountBalance;

    /**
     * 对方账户归属主体ID
     */
    @TableField(value = "opposite_object_id")
    @Schema(description = "对方账户归属主体ID")
    private String oppositeObjectId;

    /**
     * 对方账户归属主体类型编码
     */
    @TableField(value = "opposite_object_type_code")
    @Schema(description = "对方账户归属主体类型编码")
    private String oppositeObjectTypeCode;

    /**
     * 操作人就职记录ID
     */
    @TableField(value = "operation_induction_id")
    @NotNull(message = "操作人就职记录ID不能为空")
    @Schema(description = "操作人就职记录ID")
    private String operationInductionId;

    /**
     * 冗余国标科目ID
     */
    @TableField(value = "national_standard_account_subjectld")
    @Schema(description = "冗余国标科目ID")
    private String nationalStandardAccountSubjectld;

    /**
     * 创建人就职记录ID
     */
    @TableField(value = "create_induction_id")
    @NotNull(message = "创建人就职记录ID 不能为空")
    @Schema(description = "创建人就职记录ID ")
    private String createInductionId;

    /**
     * 冗余部门组织科目ID
     */
    @TableField(value = "dept_org_account_subjectld")
    @Schema(description = "冗余部门组织科目ID")
    private String deptOrgAccountSubjectld;

    /**
     * 冗余内容科目ID
     */
    @TableField(value = "contnet_account_subjectld")
    @Schema(description = "冗余内容科目ID")
    private String contnetAccountSubjectld;

    /**
     * 冗余资金来源ID
     */
    @TableField(value = "capital_source_id")
    @Schema(description = "冗余资金来源ID")
    private String capitalSourceId;

    /**
     * 操作时间
     */
    @TableField(value = "operate_time")
    @NotNull(message = "操作时间不能为空")
    @Schema(description = "操作时间")
    private Date operateTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @NotNull(message = "创建时间不能为空")
    @Schema(description = "创建时间")
    private Date createTime;

    /**
     * 是否作废 TRUE:是 FALSE:否
     */
    @TableField(value = "is_valid")
    @NotNull(message = "是否作废不能为空")
    @Schema(description = "是否作废")
    private String isValid;

    /**
     * 创建于空间ID
     */
    @TableField(value = "space_id")
    @NotNull(message = "创建于空间ID不能为空")
    @Schema(description = "创建于空间ID")
    private String spaceId;

    /**
     * 创建于联盟应用ID
     */
    @TableField(value = "app_id")
    @NotNull(message = "创建于联盟应用ID不能为空")
    @Schema(description = "创建于联盟应用ID")
    private String appId;
}
